Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Asset and Op ExecutionContexts in standard execution path #17972

Conversation

jamiedemaria
Copy link
Contributor

@jamiedemaria jamiedemaria commented Nov 13, 2023

Summary & Motivation

This PR is not strictly required to merge #17339. However, as we deprecate more methods, we will begin to deprecate context methods that are called in the main execution pathway.

This PR proposes adding a subobject to both AssetExecutionContext and OpExecutionContext that contains all methods/properties that need to be accessed in the execution code path.

How I Tested These Changes

@jamiedemaria
Copy link
Contributor Author

jamiedemaria commented Nov 13, 2023

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from e01caed to f724155 Compare November 14, 2023 18:02
@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch from 513ece0 to 8a1bc21 Compare November 14, 2023 18:02
@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from f724155 to 541fde7 Compare November 15, 2023 17:13
@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch from 8a1bc21 to e64fb39 Compare November 15, 2023 17:13
Copy link

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-ahy46vn8d-elementl.vercel.app
https://jamie-execution-path-with-two-contexts.core-storybook.dagster-docs.io

Built with commit e64fb39.
This pull request is being automatically deployed with vercel-action

@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch 2 times, most recently from fd482bd to 18c5c92 Compare November 15, 2023 20:13
@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from a8f971d to a45639e Compare November 16, 2023 14:33
@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch from a6d086b to 62b7ad6 Compare November 16, 2023 14:33
@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from a45639e to 115aabb Compare November 16, 2023 21:09
@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch 2 times, most recently from 5043c25 to 770c04c Compare November 17, 2023 15:31
@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from 07736d6 to 815d4e3 Compare November 17, 2023 21:46
@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch from 770c04c to 4acf05c Compare November 17, 2023 21:46
@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from 815d4e3 to f172b7e Compare November 17, 2023 21:53
@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch from 4acf05c to 4e90152 Compare November 17, 2023 21:53
@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from f172b7e to 5960e17 Compare November 20, 2023 19:56
@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch 2 times, most recently from 455bd9c to 63cf5b0 Compare November 20, 2023 20:28
"_ExecutionProperties",
[
("step_description", PublicAttr[str]),
("op_execution_context", PublicAttr["OpExecutionContext"]),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having to pass the OpExecutionContext here is kind of annoying, but the alternative is doing isinstance(context, AssetExecutionContext) checks in the core execution code so that we can access context.op_execution_context when the context is an AssetExecutionContext

Copy link
Contributor Author

@jamiedemaria jamiedemaria Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another option could be to move the functions needed from OpExecutionContext in the core execution path (has_events and consume_events) into the ExecutionProperties named tuple. I can look into that option as well. It might require passing the step execution context to this class, so might not be much better

@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from cae085a to 3a8e919 Compare November 22, 2023 16:29
@jamiedemaria jamiedemaria force-pushed the jamie/execution_path_with_two_contexts branch from 63cf5b0 to e5e974c Compare November 22, 2023 16:29
@jamiedemaria jamiedemaria force-pushed the jamie/asset-context-deprecation-setup branch from 3a8e919 to fa8509f Compare November 28, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant